package com.tjetc;

import java.lang.reflect.Method;

/**
 * 映射器
 *
 *
 * @author gaoyongxiang
 * @version v1.0
 * @date 2025/9/9
 */
public class MyHandler {
    // 请求的路径 url
    private String url;
    // 通过请求的这个路径 要到达哪一个controller
    private Object controller;
    // 找到controller后我要执行哪个方法
    private Method method;


    public MyHandler(String url, Object controller, Method method) {
        this.url = url;
        this.controller = controller;
        this.method = method;
    }


    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Object getController() {
        return controller;
    }

    public void setController(Object controller) {
        this.controller = controller;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    @Override
    public String toString() {
        return "MyHandler{" +
                "url='" + url + '\'' +
                ", controller=" + controller +
                ", method=" + method +
                '}';
    }
}